<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
// 需求：打印一行5个小星星。
console.log('*****');

let start = '';
for(let i = 0;i<5;i++){
    start = start + '*';
}
console.log(start);

 // 打印 4 行， 每行 5 个小星星
 for(let i = 1; i<=5; i++){
    let start = '';
    for(let j = 0;j <5;j++){
        start = start + '*';
    }
     console.log(start,i);
 }

// 让用户决定打印几行，几列小星星。
let num1 = prompt('星星每行个数');
let num = prompt('星星列数');
 for(let i = 1; i<=num; i++){
    let start = '';
    for(let j = 0;j <num1;j++){
        start = start + '*';
    }
     console.log(start,i);
 }


    </script>
</body>
</html>